@extends('layout.admin')

@section('title')
    <title>
        会员列表
    </title>
@endsection

@section('content')
<div class="x-body">
    
    <table class="layui-table">
        <thead>
            <tr>
                <th>
                    ID
                </th>
                <th>
                    用户名
                </th>
                <th>
                    邮箱
                </th>
                <th>
                    称谓
                </th>
               
                <th>
                    状态
                </th>
                <th>
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
        	@foreach($users as $k=>$v)
            <tr>
                
                <td>
                    {{$v['id']}}
                </td>
                <td>
                    <u onclick="member_show('张三','member-show.html','10001','360','400')" style="cursor:pointer">
                        {{$v['username']}}
                    </u>
                </td>
                <td>
                    {{$v['email']}}
                </td>
                <td>
                    {{$v['chengwei']}}
                </td>
               
                
                <td class="td-status">
                    <span class="layui-btn layui-btn-normal layui-btn-mini">
                        已启用
                    </span>
                </td>
                <td class="td-manage">

                    <a title="修改" href="/user/{{$v->id}}/edit" onclick="member_password('修改','member-password.html','10001','600','400')" style="text-decoration:none">
                        <button><i class="layui-icon" ></i></button>
                    </a>
                    <form action="/user/{{$v->id}}" method="post">
                    	<input type="hidden" name="_method" value="delete">
                    	{{csrf_field()}}
	                    <button > <i class="layui-icon" ></i></button>
                    </form>
                </td>
            </tr>
            @endforeach
        </tbody>
    </table>

    <style>

		#page li{
			background-color: #fff;
		    
		    color: #333;
		    display: inline-block;
		    font-size: 12px;
		    height: 28px;
		    line-height: 28px;
		    margin: 0 -1px 5px 0;
		    padding: 0 15px;
		    vertical-align: middle;
		}

    </style>

    <div id="page">
    	<div id="layui-laypage-0" class="layui-box layui-laypage layui-laypage-default list-inline">
    	{!!$users->render()!!}
    		
    	</div>
    	
    </div>
</div>
@endsection